package compile;

/**
 * @author vivi
 * @description
 * @date 2024/5/8
 */
//表示一个Task的执行结果
public class Answer {
    //出错码
    //如果error为0 表示运行编译都 ok
    //如果error为1 表示编译出错
    //如果error为2 表示运行出错
    private int error;
    //出错的提示信息
    private String reason;
    //运行程序得到的标准输出的结果
    private String stdout;
    //运行程序得到的标准错误的结果
    private String stderr;

    public int getError () {
        return error;
    }

    public void setError (int error) {
        this.error = error;
    }

    public String getReason () {
        return reason;
    }

    public void setReason (String reason) {
        this.reason = reason;
    }

    public String getStdout () {
        return stdout;
    }

    public void setStdout (String stdout) {
        this.stdout = stdout;
    }

    public String getStderr () {
        return stderr;
    }

    public void setStderr (String stderr) {
        this.stderr = stderr;
    }

    @Override
    public String toString () {
        return "compile.Answer{" +
                "error=" + error +
                ", reason='" + reason + '\'' +
                ", stdout='" + stdout + '\'' +
                ", stderr='" + stderr + '\'' +
                '}';
    }
}
